import request from '@/utils/request'

export default {
  // 列表
  query(data) {
    return request({
      url: `/v1/supplier/supplier-return/list`,
      method: 'post',
      data
    })
  },
  // 添加
  create(data) {
    return request({
      url: `/v1/supplier/supplier-return/create`,
      method: 'post',
      data
    })
  },
  // 编辑
  edit(data) {
    return request({
      url: `/v1/supplier/supplier-return/edit`,
      method: 'post',
      data
    })
  },
  // 详情
  detail(params) {
    return request({
      url: `/v1/supplier/supplier-return/detail`,
      method: 'get',
      params
    })
  },
  // 提交
  submit(params) {
    return request({
      url: `/v1/supplier/supplier-return/save`,
      method: 'get',
      params
    })
  },
  // 批量审核
  batchAudit(data) {
    return request({
      url: `/v1/supplier/supplier-return/batch-audit`,
      method: 'post',
      data
    })
  },
  // 获取可退数量
  getSkuStock(data) {
    return request({
      url: `/v1/supplier/supplier-return/get-sku-stock`,
      method: 'post',
      data
    })
  },
  // 商品列表
  getGoods(data) {
    return request({
      baseURL: 'http://10.20.9.25:10086',
      url: `/v1/goods/sku/list`,
      method: 'post',
      data
    })
  },
}
